<?php

	namespace Phptricks\system\library\iniscanner;

/*
	 * To change this license header, choose License Headers in Project Properties.
	 * To change this template file, choose Tools | Templates
	 * and open the template in the editor.
	 */
/**
	 * Description of iniscanner
	 *
	 * @author Sammy Guergachi <sguergachi at gmail.com>
	 */
	use Phptricks\system\library\PhptricksExceptions\PhptricksExceptions as Exc;

	class iniscanner{

		public $ini_properties;
		private static $_instance = null;

		public static function getinstance($config = ''){
			if (self::$_instance === null) {
				self::$_instance = new \Phptricks\system\library\iniscanner\iniscanner();
			}
			return self::$_instance;
		}

		public function _initialize($config = ''){
			
		}

		public function Raed_Ini_File($filepath){
			if (!isset($filepath) || empty($filepath)) {
				throw new Exc('you should be set file path in _raed($filepath);');
			}
			if (!\file_exists($filepath)) {
				throw new Exc('your file :' . $filepath . ' not found');
			}
			$this->ini_properties = \parse_ini_file($filepath, true);
			return true;
		}

	}
	